<template>
	<view class="content">
		<view class="info-box">
			<view class="item column">
				<text class="label">日程标题</text>
				<text class="text">{{item.title}}</text>
			</view>
			<view class="item column">
				<text class="label">日程类型</text>
				<text class="text">{{utils.getDictLabelName("eventType",item.eventType)}}</text>
			</view>
			<view class="item column">
				<text class="label">开始时间</text>
				<text class="text">{{item.startTime}}</text>
			</view>
			 <view class="item column">
			 	<text class="label">结束时间</text>
			 	<text class="text">{{item.limitTime}}</text>
			 </view>
			 <view class="item column">
			 	<text class="label">提醒时间</text>
			 	<text class="text">{{item.noticeTime}}</text>
			 </view>
			 <view class="item column">
			 	<text class="label">日程内容</text>
			 	<text class="text">{{item.content}}</text>
			 </view>
		  </view>
	</view>
</template>

<script>
	import api from '@/api/api.js';
	export default {
		data() {
			return {
				eventId:undefined,
				item:{},
			}
		},
		onLoad(options) {
			this.eventId = options.eventId
			// 修改顶部导航背景色
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: '#39b54a',
				animation: {
					duration: 400,
					timingFunc: 'easeIn'
				}
			})
			this.getEvent()
		},
		methods: {
			getEvent(){
				var data = {eventId:this.eventId};
				var that=this;
				api.getEvent(data).then(
					res => {
						if(res.code==200){
							 this.item=res.event;
							 
						}else{
							uni.showToast({
								icon:'none',
								title: "请求失败",
							});
						}
					},
					rej => {}
				);
			},
			 
		}
	}
</script>

<style scoped lang="scss">
	.content{
		background: #fff;
		padding-bottom: 20upx;
		.info-box{
			.head{
				height: 60upx;
				line-height: 60upx;
				font-size: 32upx;
				color: #000;
				font-weight: bold;
				position: relative;
				padding: 10upx 50upx;
				// &::after{
				// 	content: "";
				// 	width: 10upx;
				// 	height: 10upx;
				// 	border-radius: 5upx;
				// 	background: #333;
				// 	position: absolute;
				// 	top: 50%;
				// 	transform: translateY(-50%);
				// 	left: 20upx;
				// }
			}
			.item{
				height: 90upx;
				line-height: 90upx;
				padding: 0 50upx;
				border-bottom: 1px solid #f7f7f7;
				&:last-child{
					border-bottom: none;
				}
				&.column{
					height: auto;
					display: flex;
					flex-direction: column;
					.text{
						margin-bottom: 20upx;
						line-height: 1.5;
					}
				}
				.label{
					font-size: 30upx;
					color: #999;
					margin-right: 30upx;
				}
				.text{
					font-size: 32upx;
					color: #000;
					&.blue{
						color: #2172FF;
					}
				}
			}
		}
	}
</style>
